Module implementing a checker for code complexity.
| None |
| ComplexityChecker | Class implementing a checker for code complexity. |
| LineComplexityVisitor | Class calculating the number of AST nodes per line of code and the median nodes/line score. |
| None |
Class implementing a checker for code complexity.
| Category |
| Codes |
| None |
| ComplexityChecker | Constructor |
| __checkLineComplexity | Private method to check the complexity of a single line of code and the median line complexity of the source code. |
| __checkMcCabeComplexity | Private method to check the McCabe code complexity. |
| None |
Constructor
Private method to check the complexity of a single line of code and the median line complexity of the source code.
Complexity is defined as the number of AST nodes produced by a line of code.
Private method to check the McCabe code complexity.
Class calculating the number of AST nodes per line of code and the median nodes/line score.
| None |
| None |
| LineComplexityVisitor | Constructor |
| score | Public method to calculate the median. |
| sortedList | Public method to get a sorted list of (line, nodes) tuples. |
| visit | Public method to recursively visit all the nodes and add up the instructions. |
| None |
Constructor
Public method to calculate the median.
Public method to get a sorted list of (line, nodes) tuples.
Public method to recursively visit all the nodes and add up the instructions.